﻿using UnityEngine;
using System.Collections;


public class NetErrorBackScene : MonoBehaviour
{
    public UILabel text;
    //private System.Action onReconnect;

    //public void ShowNetError( System.Action onClick)
    //{
        //onReconnect = onClick;
    //}

    public void BackToScene()
    {
        ManagerController.Instance.BattleToField();
        gameObject.SetActive(false);

        ManagerController.Instance.StartCoroutine(_Error());
    }

    IEnumerator _Error()
    {
        yield return new WaitForSeconds(1f);
        StaticData.curBattleData.battleType = BattleType.PVE;
        NetAPI.ShowNeedSocketConnect(true);
        Destroy(gameObject);
    }
   
}
